package com.neusoft.bizcore.auth.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neusoft.bizcore.auth.converter.AuthContentTypeConverter;
import com.neusoft.bizcore.auth.dto.AuthContentTypeDTO;
import com.neusoft.bizcore.auth.model.AuthContentType;
import com.neusoft.bizcore.auth.repository.AuthContentTypeRepository;
import com.neusoft.bizcore.auth.service.AuthContentTypeService;

@Service
public class AuthContentTypeServiceImpl implements AuthContentTypeService {

    @Autowired
    private AuthContentTypeRepository authContentTypeRepository;
    @Autowired
    private AuthContentTypeConverter authContentTypeConverter;

    @Override
    public List<AuthContentTypeDTO> findAll() {
        final List<AuthContentType> models = this.authContentTypeRepository.findAll();
        final List<AuthContentTypeDTO> dtos = this.authContentTypeConverter.toListDTO(models);
        return dtos;
    }

}
